<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" data-rule="required" class="form-control"  name="row[number]" type="text"value="{$row.number}" >
        </div>
   </div>
      <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.data')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-day" data-rule="required" class="form-control selectpicker" name="row[day]">
                {foreach name="$WeekInfo['dayList']" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.day"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.Pay_type')}:</label>
        <div class="col-xs-12 col-sm-8">
             {:build_radios('row[pay_type]', $WeekInfo['payTypeList'], $row.pay_type)}        
           <!--  <select  id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
                {foreach name="$WeekInfo['payTypeList']" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select> -->

        </div>
    </div>

     <div class="form-group display_cost_id">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.Cost_id')}:</label>
        <div class="col-xs-12 col-sm-8">
		 <input id="c-cost_id" data-source="/api/base/cost"  data-params='{"custom[type]":"1","custom[delete_status]":"1"}'   class="form-control selectpage" name="row[cost_id]" type="text" value="{$row.cost_id}">
        </div>
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price}">
        </div>
    </div>
    
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.Abstract')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-abstract" class="form-control" name="row[abstract]" type="text" value="{$row.abstract}">
        </div>
    </div>
      <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Books.Sign')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sign" class="form-control" name="row[sign]" type="text" value="{$row.sign}">
        </div>
    </div>
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-desc" class="form-control" rows="5" name="row[desc]" cols="50">{$row.desc}</textarea>
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">

window.onload=function(){
      //do something
	var pay_type = '{$row.pay_type}';
		if(pay_type == 1){
		var divset = document.getElementsByClassName("display_cost_id");
		 for (var i = 0; i<divset.length;i++) {
				divset[i].style.display="none";
			}
		 }
	
	//setTimeout(function() {
	//},2000);
}
</script>